home *** CD-ROM | disk | FTP | other *** search
/ Netware Super Library / Netware Super Library.iso / virus / vste204 / install.btm < prev    next >
Text File  |  1995-03-21  |  16KB  |  527 lines

  1. @echo off
  2.  
  3. :::     Virus Script Suite Installer
  4. :::     Version 2.04        Tue  03/21/95
  5. :::     Mark Hazen   (mhazen@fcs.uga.edu)
  6.  
  7. :main
  8.  if not exist makefile.1 goto missing
  9.  if not exist makefile.2 goto missing
  10.  if not exist makefile.3 goto missing
  11.  if not exist makefile.4 goto missing
  12.  if not exist makefile.5 goto missing
  13.  on break goto exit
  14.  goto herewego
  15.  
  16. :missing
  17.  color whi on bla
  18.  cls
  19.  echo I was unable to find all of the files I need to use to create the Virus
  20.  echo Scanning Suite scripts. Please run the Installer from the directory
  21.  echo you unpacked the files to.
  22.  echo.
  23.  delay 6
  24.  goto exit
  25.  
  26. :herewego
  27.  setdos /s0:0
  28.  color bri whi on blu bord bla
  29.  cls
  30.  echo.
  31.  echo.
  32.  echo        ■ VIRUS SCRIPT SUITE INSTALLER ■
  33.  color bri yel on blu
  34.  text
  35.  
  36.        This program custom builds the Virus Script Suite for version 2.04
  37.        of the scripts.  If you have not done so already, read ALL of the
  38.        documentation enclosed in the original archive.
  39.  
  40.        Disclaimer time-
  41.  
  42.        This package is provided, free of charge, in an "as-is" state;
  43.        that is, neither the programmer nor the supplier will be held
  44.        liable to any claims of performance or stability, and support for
  45.        this product is solely at the discretion of the abovementioned
  46.        parties. The abovementioned parties shall not be liable for any
  47.        damages or problems which arise through the incorrect OR correct
  48.        use of this product, not limited to software and/or hardware
  49.        liabilities.
  50.  
  51.        This product may NOT be sold for profit by any organization or
  52.        individual.
  53.                                                 [continued next page]
  54.  endtext
  55.  drawbox 24 0 24 79 0 cya on cya fill cya
  56.  scrput 24 6 blu on cya Press the 'any' key for the next page....
  57. :readkey
  58.  inkey /c /p %%instring
  59.  set instring=
  60.  
  61.  color bri whi on blu bord bla
  62.  cls
  63.  echo.
  64.  echo.
  65.  echo        ■ VIRUS SCRIPT SUITE INSTALLER ■
  66.  color bri yel on blu
  67.  text
  68.  
  69.        This product has been tested to the best of the author's capability,
  70.        and is provided in good faith. If you are uncertain of the
  71.        integrity of this archive PLEASE do yourself and the author a biiiig
  72.        favor, and retrieve the -newest- version of this software via
  73.        anonymous FTP from ftp.fcs.uga.edu (128.192.32.50), in the
  74.        public/ftp/novell directory. The newest version of this software
  75.        will be stored there as VSTExxx.ZIP, where xxx is a version number.
  76.  
  77.        Do understand and agree to the disclaimer as provided above?
  78.  
  79.  endtext
  80.  drawbox 24 0 24 79 0 cya on cya fill cya
  81.  scrput 24 2 blu on cya Choose one of the above choices, using cursor keys and ENTER:
  82.  echo Yeah! Let's kick viral butt! rNo! I thought I was installing WordPerfect!rLet me read that first page again, please!|set chosen=%@select[CON,14,18,18,63,]
  83.  if %@instr[0,1,%chosen]==L goto main
  84.  if %@instr[0,1,%chosen]==Y goto contin
  85.  goto exit
  86.  
  87. :contin
  88.  set chosen=
  89.  
  90. :getname
  91.  color whi on blu
  92.  cls
  93.  drawbox 24 0 24 79 0 cya on cya fill cya
  94.  scrput 24 1 blu on cya Virus Script Suite Installer
  95.  scrput 24 75 blu on cya v2.03
  96. text
  97.  
  98.    Here we go! First of all, I need some basic information from you.
  99.    The first one is an easy one: What would you like the title of your
  100.    scanner to appear as to the user?
  101.  
  102.    This can be any text string, 58 characters or less in length. It will
  103.    automatically be centered onscreen in your scanner's main menu page.
  104.  
  105.  endtext
  106.  color bri whi on blu
  107.  setdos /s10:100
  108.  input /c /l58 `   Scanner Title:` %%title
  109.  setdos /s0:0
  110.  if %@len[%title] GT 2 goto gotname
  111.  color bri yel on blu
  112.  echo.
  113.  echo    Please enter an actual title here. Something like "FRED'S SCANNER"
  114.  echo    would be appropriate.
  115.  beep 1800 2
  116.  delay 3
  117.  goto getname
  118.  
  119. :gotname
  120.  color whi on blu
  121.  echo.
  122.  echo.
  123.  echo      Your scanner is going to have a title which looks something like this:
  124.  echo.
  125.  echo           ╔═══════════════════════════════════════════════════════════╗
  126.  echo           ║                                                           ║
  127.  echo           ║                                                           ║
  128.  scrput 14 %@eval[39-(%@len[%title]/2)] bri whi on blu  %title 
  129.  echo.
  130.  echo    Is this title correct? (Y/n)
  131.  inkey /c /p /k"yn" %%query
  132.  if %query NE y goto getname
  133.  
  134. :getfpd
  135.  color whi on blu
  136.  cls
  137.  drawbox 24 0 24 79 0 cya on cya fill cya
  138.  scrput 24 1 blu on cya Virus Script Suite Installer
  139.  scrput 24 75 blu on cya v2.03
  140. text
  141.  
  142.    Easy enough! Now I need to know the name of a directory on each of
  143.    your user's hard drives I can store F-PROT in, to reduce the load on
  144.    your server and speed their scanning up.
  145.  
  146.    If this directory does not exist on the user's hard drive, I will
  147.    create it for them the first time they run the scanner.
  148.  
  149.  endtext
  150.  color bri whi on blu
  151.  setdos /s10:100
  152.  input /c `   Local directory:` %%localdir
  153.  setdos /s0:0
  154.  if %@len[%localdir] GT 2 goto gotfpd
  155.  color bri yel on blu
  156.  echo.
  157.  echo    Please enter a valid path for this string. Most folks like to use
  158.  echo    something like "C:\FPROT" or "C:\UTIL", but use your judgement.
  159.  beep 1800 2
  160.  delay 3
  161.  goto getfpd
  162.  
  163. :gotfpd
  164.  set tmpstr=%@upper[%localdir]
  165.  set localdir=%tmpstr
  166.  set tmpstr=%@instr[%@eval[%@len[%localdir]-1],1,%localdir]
  167.  if %tmpstr NE \ goto nofpds
  168.  set tmpstr=%@instr[0,%@eval[%@len[%localdir]-1],%localdir]
  169.  set localdir=%tmpstr
  170.  goto gotfpd
  171.  
  172. :nofpds
  173.  scrput 8 20 whi on blu `                                                              `
  174.  scrput 8 20 bri whi on blu %localdir
  175.  echo.
  176.  color bri yel on blu
  177.  echo    Is this path correct? (Y/n)
  178.  inkey /c /p /k"yn" %%query
  179.  if %query NE y goto getfpd
  180.  
  181. :getarcd
  182.  color whi on blu
  183.  cls
  184.  drawbox 24 0 24 79 0 cya on cya fill cya
  185.  scrput 24 1 blu on cya Virus Script Suite Installer
  186.  scrput 24 75 blu on cya v2.03
  187. text
  188.  
  189.    Now, I need to know the path of a directory on your server where you
  190.    will store an archive version of F-Prot. This is where you will put
  191.    new versions of F-Prot as they become available.
  192.  
  193.    Please read the documentation for more information regarding updating
  194.    the version of F-Prot you are using. This needs to be in a public area.
  195.  
  196.  endtext
  197.  color bri whi on blu
  198.  setdos /s10:100
  199.  input /c `   Archive directory:` %%arcdir
  200.  setdos /s0:0
  201.  if %@len[%arcdir] GT 2 goto gotarcd
  202.  color bri yel on blu
  203.  echo.
  204.  echo    Please enter a valid path for this string. Be specific, and include
  205.  echo    the drive letter... don't assume I'll put it on your main net drive.
  206.  beep 1800 2
  207.  delay 3
  208.  goto getarcd
  209.  
  210. :gotarcd
  211.  set tmpstr=%@upper[%arcdir]
  212.  set arcdir=%tmpstr
  213.  set tmpstr=%@instr[%@eval[%@len[%arcdir]-1],1,%arcdir]
  214.  if %tmpstr NE \ goto noarcs
  215.  set tmpstr=%@instr[0,%@eval[%@len[%arcdir]-1],%arcdir]
  216.  set arcdir=%tmpstr
  217.  goto gotarcd
  218.  
  219. :noarcs
  220.  scrput 8 22 whi on blu `                                                              `
  221.  scrput 8 22 bri whi on blu %arcdir
  222.  echo.
  223.  color bri yel on blu
  224.  if direxist %arcdir goto exarcd
  225.  echo    This directory does not exist. Do you want to create it (Y/n)?
  226.  inkey /c /p /k"yn" %%query
  227.  if %query NE y goto getarcd
  228.  md %arcdir>&NUL
  229.  if %_?==0 goto exarcd
  230.  echo    There was a problem creating this directory. Please make certain
  231.  echo    that you have appropriate rights to create this directory, and
  232.  echo    that you have entered a valid path, and try again.
  233.  beep 1800 2
  234.  delay 5
  235.  goto getarcd
  236.  
  237. :exarcd
  238.  echo    Is this path correct? (Y/n)
  239.  inkey /c /p /k"yn" %%query
  240.  if %query NE y goto getarcd
  241.  
  242. :getvssd
  243.  color whi on blu
  244.  cls
  245.  drawbox 24 0 24 79 0 cya on cya fill cya
  246.  scrput 24 1 blu on cya Virus Script Suite Installer
  247.  scrput 24 75 blu on cya v2.03
  248. text
  249.  
  250.    Where would you like to store these scripts? This needs to be in a
  251.    public area, once again. This directory will store the DOS and 4DOS
  252.    scripts used in the Virus Script Suite.
  253.  
  254.    Please read the documentation for more information regarding what
  255.    this directory is used for.
  256.  
  257.  endtext
  258.  color bri whi on blu
  259.  setdos /s10:100
  260.  input /c `   Script directory:` %%vssdir
  261.  setdos /s0:0
  262.  if %@len[%vssdir] GT 2 goto gotvssd
  263.  color bri yel on blu
  264.  echo.
  265.  echo    Please enter a valid path for this string. Be specific, and include
  266.  echo    the drive letter... don't assume I'll put it on your main net drive.
  267.  beep 1800 2
  268.  delay 3
  269.  goto getvssd
  270.  
  271. :gotvssd
  272.  set tmpstr=%@upper[%vssdir]
  273.  set vssdir=%tmpstr
  274.  set tmpstr=%@instr[%@eval[%@len[%vssdir]-1],1,%vssdir]
  275.  if %tmpstr NE \ goto novsss
  276.  set tmpstr=%@instr[0,%@eval[%@len[%vssdir]-1],%vssdir]
  277.  set vssdir=%tmpstr
  278.  goto gotvssd
  279.  
  280. :novsss
  281.  scrput 8 21 whi on blu `                                                              `
  282.  scrput 8 21 bri whi on blu %vssdir
  283.  echo.
  284.  color bri yel on blu
  285.  if direxist %vssdir goto exvssd
  286.  echo    This directory does not exist. Do you want to create it (Y/n)?
  287.  inkey /c /p /k"yn" %%query
  288.  if %query NE y goto getvssd
  289.  md %vssdir>&NUL
  290.  if %_?==0 goto exvssd
  291.  echo    There was a problem creating this directory. Please make certain
  292.  echo    that you have appropriate rights to create this directory, and
  293.  echo    that you have entered a valid path, and try again.
  294.  beep 1800 2
  295.  delay 5
  296.  goto getvssd
  297.  
  298. :exvssd
  299.  echo    Is this path correct? (Y/n)
  300.  inkey /c /p /k"yn" %%query
  301.  if %query NE y goto getvssd
  302.  
  303. :gettempd
  304.  color whi on blu
  305.  cls
  306.  drawbox 24 0 24 79 0 cya on cya fill cya
  307.  scrput 24 1 blu on cya Virus Script Suite Installer
  308.  scrput 24 75 blu on cya v2.03
  309. text
  310.  
  311.    Now I need the path of a work directory, where the Virus Scanning
  312.    Scripts can make temporary report files. These files will be deleted
  313.    automatically when clean scans occur, but will be left if viruses
  314.    are found. This way, you can always go check manually what a virus
  315.    scan turned up. This directory should be on the local user's hard
  316.    drive.
  317.  
  318.    If this directory does not exist on the user's hard drive, I will
  319.    create it the first time they run the scanner.
  320.  
  321.  endtext
  322.  color bri whi on blu
  323.  setdos /s10:100
  324.  input /c `   Temp directory:` %%tempdir
  325.  setdos /s0:0
  326.  if %@len[%tempdir] GT 2 goto gottempd
  327.  color bri yel on blu
  328.  echo.
  329.  echo    Please enter a valid path for this string. Something like C: or
  330.  echo    C:\TEMP is usually appropriate for this directory name.
  331.  beep 1800 2
  332.  delay 3
  333.  goto gettempd
  334.  
  335. :gottempd
  336.  set tmpstr=%@upper[%tempdir]
  337.  set tempdir=%tmpstr
  338.  set tmpstr=%@instr[%@eval[%@len[%tempdir]-1],1,%tempdir]
  339.  if %tmpstr NE \ goto notemps
  340.  set tmpstr=%@instr[0,%@eval[%@len[%tempdir]-1],%tempdir]
  341.  set tempdir=%tmpstr
  342.  goto gottempd
  343.  
  344. :notemps
  345.  scrput 11 19 whi on blu `                                                              `
  346.  scrput 11 19 bri whi on blu %tempdir
  347.  echo.
  348.  color bri yel on blu
  349.  
  350. :extempd
  351.  echo    Is this path correct? (Y/n)
  352.  inkey /c /p /k"yn" %%query
  353.  if %query NE y goto gettempd
  354.  
  355. :getrepd
  356.  color whi on blu
  357.  cls
  358.  drawbox 24 0 24 79 0 cya on cya fill cya
  359.  scrput 24 1 blu on cya Virus Script Suite Installer
  360.  scrput 24 75 blu on cya v2.03
  361. text
  362.  
  363.    I need a directory in which to store virus scan summary files, which
  364.    can be used by you to check on exactly what the scanning information
  365.    has produced, and also to allow for notification to you when a virus
  366.    has been found. This must be a network drive, and it must be publicly
  367.    writable. For more in depth information as to what this directory is
  368.    for, consult the documentation.
  369.  
  370.  endtext
  371.  color bri whi on blu
  372.  setdos /s10:100
  373.  input /c `   Summary directory:` %%repdir
  374.  setdos /s0:0
  375.  if %@len[%repdir] GT 2 goto gotrepd
  376.  color bri yel on blu
  377.  echo.
  378.  echo    Please enter a valid path for this string. Be specific, and include
  379.  echo    the drive letter... don't assume I'll put it on your main net drive.
  380.  beep 1800 2
  381.  delay 3
  382.  goto getrepd
  383.  
  384. :gotrepd
  385.  set tmpstr=%@upper[%repdir]
  386.  set repdir=%tmpstr
  387.  set tmpstr=%@instr[%@eval[%@len[%repdir]-1],1,%repdir]
  388.  if %tmpstr NE \ goto noreps
  389.  set tmpstr=%@instr[0,%@eval[%@len[%repdir]-1],%repdir]
  390.  set repdir=%tmpstr
  391.  goto gotrepd
  392.  
  393. :noreps
  394.  scrput 8 22 whi on blu `                                                              `
  395.  scrput 8 22 bri whi on blu %repdir
  396.  echo.
  397.  color bri yel on blu
  398.  if direxist %repdir goto exrepd
  399.  echo    This directory does not exist. Do you want to create it (Y/n)?
  400.  inkey /c /p /k"yn" %%query
  401.  if %query NE y goto getrepd
  402.  md %repdir>&NUL
  403.  if %_?==0 goto exrepd
  404.  echo    There was a problem creating this directory. Please make certain
  405.  echo    that you have appropriate rights to create this directory, and
  406.  echo    that you have entered a valid path, and try again.
  407.  beep 1800 2
  408.  delay 5
  409.  goto getrepd
  410.  
  411. :exrepd
  412.  echo    Is this path correct? (Y/n)
  413.  inkey /c /p /k"yn" %%query
  414.  if %query NE y goto getrepd
  415.  
  416. :verify
  417.  color whi on blu
  418.  cls
  419.  drawbox 24 0 24 79 0 cya on cya fill cya
  420.  scrput 24 1 blu on cya Virus Script Suite Installer
  421.  scrput 24 75 blu on cya v2.03
  422. text
  423.  
  424.    Just to recap, here's the information you gave me:
  425.  
  426.  endtext
  427.  color bri yel on blu
  428.  echos  My scanner's title:
  429.  color bri whi on blu
  430.  echo  %title
  431.  color bri yel on blu
  432.  echos  I'll find F-Prot on the user's drive in:
  433.  color bri whi on blu
  434.  echo  %localdir
  435.  color bri yel on blu
  436.  echos  I will find new versions of F-Prot in:
  437.  color bri whi on blu
  438.  echo  %arcdir
  439.  color bri yel on blu
  440.  echos  I should build the scripts in:
  441.  color bri whi on blu
  442.  echo  %vssdir
  443.  color bri yel on blu
  444.  echos  My workspace on user's hard drives should be:
  445.  color bri whi on blu
  446.  echo  %tempdir
  447.  color bri yel on blu
  448.  echos  I should file reports in:
  449.  color bri whi on blu
  450.  echo  %repdir
  451.  echo.
  452.  echo    Is ALL of the above correct? (Y/n)
  453.  inkey /c /p /k"yn" %%query
  454.  if %query NE y goto main
  455.  
  456. :build
  457.  color whi on blu
  458.  cls
  459.  drawbox 24 0 24 79 0 cya on cya fill cya
  460.  scrput 24 1 blu on cya Virus Script Suite Installer
  461.  scrput 24 75 blu on cya v2.03
  462.  echo.
  463.  echo.
  464.  echo    Please wait... building scripts using the information you gave me....
  465.  echo.
  466.  color bri yel on blu
  467.  
  468.  echo    Building VSCAN.BTM...
  469.  
  470.  type makefile.1>%vssdir\vscan.btm
  471.  echos  set title=>>%vssdir\vscan.btm
  472.  echo %title>>%vssdir\vscan.btm
  473.  echo  set version=2.04>>%vssdir\vscan.btm
  474.  echos  set fpdir=>>%vssdir\vscan.btm
  475.  echo %localdir>>%vssdir\vscan.btm
  476.  echos  set arcdir=>>%vssdir\vscan.btm
  477.  echo %arcdir>>%vssdir\vscan.btm
  478.  echos  set vssdir=>>%vssdir\vscan.btm
  479.  echo %vssdir>>%vssdir\vscan.btm
  480.  echos  set tempdir=>>%vssdir\vscan.btm
  481.  echo %tempdir>>%vssdir\vscan.btm
  482.  echos  set repdir=>>%vssdir\vscan.btm
  483.  echo %repdir>>%vssdir\vscan.btm
  484.  type makefile.2>>%vssdir\vscan.btm
  485.  
  486.  echo    Building VSSHELP.DAT...
  487.  
  488.  type makefile.5>>%vssdir\vsshelp.dat
  489.  
  490.  echo    Building VCHECK.BTM...
  491.  
  492.  type makefile.3>%vssdir\vcheck.btm
  493.  echos  set repdir=>>%vssdir\vcheck.btm
  494.  echo %repdir>>%vssdir\vcheck.btm
  495.  type makefile.4>>%vssdir\vcheck.btm
  496.  
  497.  echo    Building VSCAN.BAT...
  498.  
  499.  echo @4dos /E:2048 /C %vssdir\vscan.btm>%vssdir\vscan.bat
  500.  echo.
  501.  color bri whi on blu
  502.  text
  503.    Installation has been completed. Please make certain you have installed
  504.    F-Prot in the ARCHIVE directory location, and that your directories have
  505.    the appropriate user rights for all of your users, as described in the
  506.    accompanying documentation.
  507.  
  508.    To exit this Installer, please press any key.
  509.  
  510.  endtext
  511.  inkey /c /p %%instring
  512.  
  513. :exit
  514.  setdos /s10:100
  515.  color whi on bla bord bla
  516.  cls
  517.  set instring=
  518.  set tmpstr=
  519.  set chosen=
  520.  set title=
  521.  set localdir=
  522.  set arcdir=
  523.  set vssdir=
  524.  set tempdir=
  525.  set repdir=
  526.  
  527.